package com.navinfo.platform.trip.common.arithmetic.enums;

import com.google.common.collect.Range;

/**
 * 速度区间
 * @author web
 */
public enum RangeSpeedEnum {
    RANGE_10(Range.closedOpen(0,10)),
    RANGE_20(Range.closedOpen(10,20)),
    RANGE_30(Range.closedOpen(20,30)),
    RANGE_40(Range.closedOpen(30,40)),
    RANGE_50(Range.closedOpen(40,50)),
    RANGE_60(Range.closedOpen(50,60)),
    RANGE_70(Range.closedOpen(60,70)),
    RANGE_80(Range.closedOpen(70,80)),
    RANGE_90(Range.closedOpen(80,90)),
    RANGE_100(Range.closedOpen(90,100)),
    RANGE_110(Range.closedOpen(100,110)),
    RANGE_120(Range.closedOpen(110,120)),
    RANGE_OVER_120(Range.atLeast(120)),
    RANGE_VALID(Range.closed(0,200));

    private Range<Integer> range;

    RangeSpeedEnum(Range<Integer> range) {
        this.range = range;

    }

    public Range<Integer> getRange() {
        return range;
    }
}
